//
//  YLCache.m
//  YiLiao-Customer
//
//  Created by 糖otk on 2017/11/13.
//  Copyright © 2017年 Burining. All rights reserved.
//

#import "YLCache.h"
#import <YYCache/YYCache.h>
#import "UserModel.h"
@implementation YLCache

DDSingletonM(YLCache)

- (YYCache *)getUserCache {
    YYCache *cache = [YYCache cacheWithName:@"userdb"];
    return cache;
}

- (UserModel *)getUserModel {
    YYCache *cache = [YYCache cacheWithName:@"userdb"];
    return (UserModel *)[cache objectForKey:@"usermodel"];
}

- (void)setUserModel:(UserModel *)userModel {
    YYCache *cache = [YYCache cacheWithName:@"userdb"];
    [cache setObject:userModel forKey:@"usermodel"];
}

@end
